Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing map.field notation and x..-y warnings #1102

Closed
wants to merge 4 commits into from

Conversation

bradhanks
Copy link
Contributor

There are two warnings showing up that I worked on removing:

warning: using map.field notation (without parentheses) to invoke function Credo.Check.Refactor.MatchInCondition.param_defaults() is deprecated, you must add parentheses instead: remote.function()

There's still one warning at: (credo 1.7.2) lib/credo/check/params.ex:39: Credo.Check.Params.get/3 but I think it is a mistake.

I also went through and added an explicit step value to descending ranges

…ses) to invoke function Credo.Check.Consistency.ExceptionNames.base_priority() is deprecated, you must add parentheses instead: remote.function() and warning: 0..-2 has a default step of -1, please write 0..-2//-1 instead
@rrrene
Copy link
Owner

rrrene commented Jan 4, 2024

Hi, where are you getting these warnings? I can't reproduce them locally and the GitHub actions runners also don't show warnings in the logs.

@bradhanks
Copy link
Contributor Author

I think the issue is that the CI tests need to be updated to a newer version of Elixir. The current tests don't recognize Range.new/3 which has been around since 1.12

@rrrene
Copy link
Owner

rrrene commented Jan 4, 2024

Could you please answer the question?

Which OS/OTP/Elixir version are you getting the aforementioned warnings on?

@bradhanks
Copy link
Contributor Author

Could you please answer the question?

Which OS/OTP/Elixir version are you getting the aforementioned warnings on?
Oh yeah sorry about that. It's 1.11.4

image

@rrrene
Copy link
Owner

rrrene commented Jan 4, 2024

I mean the warnings that prompted you to create this PR. Where did you get those?

@bradhanks
Copy link
Contributor Author

I ran mix credo on the credo master branch.

Erlang/OTP 26 [erts-14.2.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns] [dtrace]

Elixir 1.16.0 (compiled with Erlang/OTP 26)

@rrrene
Copy link
Owner

rrrene commented Jan 5, 2024

And which OS?

@bradhanks
Copy link
Contributor Author

MacOS 13.4.1 (c) (22F770820d

@rrrene
Copy link
Owner

rrrene commented Jan 30, 2024

Hi, since I was not able to reproduce this with any of my friends or in GitHub actions (where we now have a Mac runner because of this issue 👍 ), I am closing this.

If anyone has any issues with this in the future, please comment and/or re-open! 🙏

@rrrene rrrene closed this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants